package org.compiere.process;

import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;

import javax.swing.JFileChooser;
import javax.swing.JList;

import jxl.Workbook;
import jxl.format.Alignment;
import jxl.format.Border;
import jxl.format.BorderLineStyle;
import jxl.format.Colour;
import jxl.format.VerticalAlignment;
import jxl.write.Label;
import jxl.write.Number;
import jxl.write.NumberFormats;
import jxl.write.WritableCellFormat;
import jxl.write.WritableFont;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;

import org.adempiere.exceptions.AdempiereException;
import org.compiere.apps.ADialog;
import org.compiere.model.MAttachmentEntry;
import org.compiere.model.MBPartner;
import org.compiere.model.MOrg;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.joda.time.DateTime;

import extend.org.compiere.hrm.ExcelCell;
import extend.org.compiere.utils.Util;
import org.utils.*;

public class FI_DeclarationOfIIT_SC200 extends SvrProcess {

	/** Current context */
	private Properties m_ctx;
	/**     */
	private ProcessInfo pi;
	/** Account Sign */
	private String AccountSign = "N";
	/** */
	private Timestamp startDate = null;
	private Timestamp endDate = null;
	private Timestamp startOfYear = null;

	private boolean xml = false;

	/** Client Parameter */
	private int AD_Client_ID = 0;
	/** Org Parameter */
	private int AD_Org_ID = 0;
	/** Account Parameter */
	private int Account_ID = 0;
	/** BPartner Parameter */
	private int C_BPartner_ID = 0;
	/** User Element 1 Parameter */
	private int UserElement1_ID = 0;
	/** Parameter Where Clause */
	// private StringBuffer m_parameterWhere = new StringBuffer();
	/** */
	private static CLogger s_log = CLogger.getCLogger(BalanceSheets.class);
	/** */
	private String path = "";

	/**
	 * Prepare - e.g., get Parameters.
	 */
	@Override
	protected void prepare() {
		log.info("");
		m_ctx = Env.getCtx();
		pi = getProcessInfo();
		ProcessInfoParameter[] para = getParameter();
		for (int i = 0; i < para.length; i++) {
			String name = para[i].getParameterName();
			if (para[i].getParameter() == null)
				;
			else if (name.equals("StartDate")){
				startDate = (Timestamp) para[i].getParameter();
				endDate = (Timestamp) para[i].getParameter_To();
			}else
				log.log(Level.SEVERE, "Unknown Parameter: " + name);
		}

		if (endDate == null)
			endDate = startDate;
		
		startOfYear = new Timestamp(endDate.getYear(), 00, 01, 00, 00, 00, 00);
		
		path = Util.localFilePath;
		AD_Client_ID = getAD_Client_ID();
		AD_Org_ID = getAD_Org_ID();
		
		// / here another code)
	}
	
	@Override
	protected String doIt() throws Exception {
		// Types of cells for
		Label label;
		Number number;
		// There are checks for a specified pattern
		String templateName = "FI_DeclarationOfIIT_SC200.00_tmpl.xls";
		//
		MAttachmentEntry entry = Util.getAttachment(pi, m_ctx, templateName);
		if (entry == null)
			throw new AdempiereException(Msg.translate(m_ctx,
					"NotFoundTemplate") + " " + templateName);

		File templateCopy = new File(Util.localFilePath
				+ "FI_DeclarationOfIIT_SC200.00.xls");
		File temporaryFile = entry.getFile(Util.localFilePath + templateName);
		Workbook tableBook = null;
		WritableWorkbook copy = null;
		WritableSheet sheet = null;
		try {
			tableBook = Workbook.getWorkbook(temporaryFile);
			copy = Workbook.createWorkbook(templateCopy, tableBook);
			sheet = copy.getSheet(0);
		} catch (Exception e) {
			ADialog.error(999, null, "Error tableBook. " + e.getMessage());
			return "Error tableBook.";
		}
		// get datas
		List<line> lines = getDatas();
		if (lines.size() == 0)
			return "Данные за период " + startDate + "/" + endDate
					+ " отсутствуют.";
		
		// РНН
		String sRNN = getRNN(getOrgBPartner_ID(AD_Org_ID));

		WritableFont arial10ptBoldRNN = new WritableFont(WritableFont.ARIAL, 10,	WritableFont.BOLD);
		WritableCellFormat wcfRNN = new WritableCellFormat(arial10ptBoldRNN);
		wcfRNN.setAlignment(Alignment.CENTRE);
		wcfRNN.setVerticalAlignment(VerticalAlignment.CENTRE);

		label = new Label(2, 2, sRNN, wcfRNN);
		sheet.addCell(label);
		
		// Имя организации
		String sName = getOrgName(AD_Org_ID);
		WritableCellFormat wcfsName = new WritableCellFormat(arial10ptBoldRNN);
		wcfsName.setAlignment(Alignment.CENTRE);
		wcfsName.setVerticalAlignment(VerticalAlignment.CENTRE);

		label = new Label(2, 4, sName, wcfsName);
		sheet.addCell(label);
		
		   // БИК
   		String sBIN = getBIN(getOrgBPartner_ID(AD_Org_ID));
   		WritableCellFormat wcfBIN = new WritableCellFormat(arial10ptBoldRNN);
   		wcfBIN.setAlignment(Alignment.LEFT);
   		wcfBIN.setVerticalAlignment(VerticalAlignment.CENTRE);

   		label = new Label(8, 2, sBIN, wcfBIN);
   		sheet.addCell(label);
      
		
		//print caption-----------------------------------------------------
		String caption = " c "
				+ new java.text.SimpleDateFormat("dd.MM.yyyy").format(
						startDate).toString()
				+ " по "
				+ new java.text.SimpleDateFormat("dd.MM.yyyy")
						.format(endDate).toString();
		WritableFont arial8ptNoBoldCaption = new WritableFont(WritableFont.ARIAL, 8,	WritableFont.NO_BOLD);
		WritableCellFormat wcfCaption = new WritableCellFormat(arial8ptNoBoldCaption);
		wcfCaption.setAlignment(Alignment.CENTRE);
		wcfCaption.setVerticalAlignment(VerticalAlignment.CENTRE);

		label = new Label(2, 6, caption, wcfCaption);
		sheet.addCell(label);

		
		// Style for value column--------------------------------------------
		WritableFont arial8ptNoBold = new WritableFont(WritableFont.ARIAL, 8,	WritableFont.NO_BOLD);
		WritableCellFormat wcfLabel = new WritableCellFormat(arial8ptNoBold);
		wcfLabel.setBorder(Border.LEFT, BorderLineStyle.MEDIUM, Colour.BLACK);
		wcfLabel.setBorder(Border.RIGHT, BorderLineStyle.THIN, Colour.BLACK);
		wcfLabel.setBorder(Border.BOTTOM, BorderLineStyle.THIN, Colour.BLACK);
		wcfLabel.setBorder(Border.TOP, BorderLineStyle.THIN, Colour.BLACK);
		wcfLabel.setAlignment(Alignment.RIGHT);
		wcfLabel.setVerticalAlignment(VerticalAlignment.CENTRE);
		wcfLabel.setWrap(true);
		
		WritableFont arial8ptNoBold2 = new WritableFont(WritableFont.ARIAL, 8,	WritableFont.NO_BOLD);
		WritableCellFormat wcfNumber = new WritableCellFormat(arial8ptNoBold2,NumberFormats.THOUSANDS_FLOAT);
		wcfNumber.setBorder(Border.LEFT, BorderLineStyle.MEDIUM, Colour.BLACK);
		wcfNumber.setBorder(Border.RIGHT, BorderLineStyle.THIN, Colour.BLACK);
		wcfNumber.setBorder(Border.BOTTOM, BorderLineStyle.THIN, Colour.BLACK);
		wcfNumber.setBorder(Border.TOP, BorderLineStyle.THIN, Colour.BLACK);
		wcfNumber.setAlignment(Alignment.RIGHT);
		wcfNumber.setVerticalAlignment(VerticalAlignment.CENTRE);
		wcfNumber.setWrap(true);
		
		//print to Excel
		int row = 12;
		
		//insert rows-------------------------------------------------------
		for (int j = 0; j < (lines.size()-1); j++) 
			sheet.insertRow(row);
		

		
		 for(int j=0; j < lines.size(); j++){
			 line li = lines.get(j);

			 label = new Label(0, row, li.getC1().toString(), wcfLabel);
			 sheet.addCell(label);
			 label = new Label(1, row, li.getC2().toString(), wcfLabel);
			 sheet.addCell(label);
			 label = new Label(2, row, li.getC3().toString(), wcfLabel);
			 sheet.addCell(label);
			 label = new Label(3, row, li.getC4().toString(), wcfLabel);
			 sheet.addCell(label);
			 label = new Label(4, row, li.getC5().toString(), wcfNumber);
			 sheet.addCell(label);
			 label = new Label(5, row, li.getC6().toString(), wcfNumber);
			 sheet.addCell(label);
			 label = new Label(6, row, li.getC7().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(7, row, li.getC8().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(8, row, li.getC9().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(9, row, li.getC10().toString(), wcfNumber);
			 sheet.addCell(label);			 			 
			 label = new Label(10, row, li.getC11().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(11, row, li.getC12().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(12, row, li.getC13().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(13, row, li.getC14().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(14, row, li.getC15().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(15, row, li.getC16().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(16, row, li.getC17().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(17, row, li.getC18().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(18, row, li.getC19().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(19, row, li.getC20().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 label = new Label(20, row, li.getC21().toString(), wcfNumber);
			 sheet.addCell(label);			 
			 
			 row++;
		 }
		

		copy.write();
		copy.close();
		tableBook.close();
		temporaryFile.delete();
		//
		try {
			String fileName = Util.localFilePath
					+ "FI_DeclarationOfIIT_SC200.00.xls";// fullPath.toString();
			String command = "excel \"" + fileName + "\"";
			Runtime.getRuntime().exec("cmd /c start " + command);
		} catch (Exception e) {
			e.printStackTrace();
		}

		return Msg.translate(m_ctx, "Success");

	}

	private List<line> getDatas() {

		List<line> list = new ArrayList<line>();
		//
		PreparedStatement pstmt = null;
		ResultSet rs = null;

		String sql = "select \n"
				+ "row_number() over (order by taxv.c_bpartner_id)\n"
				+ ",(select name from adempiere.c_bpartner where c_bpartner_id = taxv.c_bpartner_id) as name\n"
				+ ",taxv.c_bpartner_id\n"
				+ ",(select fi_tin from adempiere.c_bpartner where c_bpartner_id = taxv.c_bpartner_id) as rnn\n"
				+ ",taxv.totalsum as c5\n" 
				+ "	,(select case when sum(ll.hrm_amount) is null then 0 else sum(ll.hrm_amount) end from adempiere.hrm_materialaid_line ll \n" 
				+ "	where ll.c_bpartner_id = taxv.c_bpartner_id \n" 
				+ "	and ll.datefrom between ? and ? \n" 
				+ "	) as c6"			
				+ ",( select sum(ll.relief) from adempiere.hrm_salarysum_v ll\n" 
				+ "		where ll.c_bpartner_id = taxv.c_bpartner_id\n" 
				+ "		and ll.datefrom BETWEEN ? and ? \n" 
				+ ") as c7"
				+ ",( select sum(ll.loan) from adempiere.hrm_salarysum_v ll\n" 
				+ "		where ll.c_bpartner_id = taxv.c_bpartner_id\n" 
				+ "		and ll.datefrom BETWEEN ? and ? \n" 
				+ ")	as c8\n" 
				+ ",0 as c9\n" 
				+ ",taxv.totalsum as c10\n" 
				+ ",taxv.opv as c11\n"
				+ ",0 as c12\n" + ",0 as c13\n" 
				+ ",taxv.ipn as c14\n"
				+ ",taxv.\"result\" as c15\n" + ",0 as c16\n" + ",0 as c17\n"
				+ ",0 as c18\n" 
				+ ",taxv.cnalog as c19\n" + ",0 as c20\n" 
				+ ",taxv.cotch as c21\n"
				+ "from adempiere.hrm_salarysum_v taxv\n"
				+ "where taxv.datefrom between ? and ? ";
		try {
			pstmt = DB.prepareStatement(sql, null);

			pstmt.setTimestamp(1, startDate);
			pstmt.setTimestamp(2, endDate);
			
			pstmt.setTimestamp(3, startOfYear);
			pstmt.setTimestamp(4, endDate);
			
			pstmt.setTimestamp(5, startDate);
			pstmt.setTimestamp(6, endDate);
			
			pstmt.setTimestamp(7, startDate);
			pstmt.setTimestamp(8, endDate);
			rs = pstmt.executeQuery();
			while (rs.next()) {
				line l = new line();
				l.setC1(rs.getInt(1));
				l.setC2(rs.getString(2));
				l.setC3(rs.getString(3));
				l.setC4(rs.getString(4));
				l.setC5(rs.getBigDecimal(5));
				l.setC6(rs.getBigDecimal(6));
				l.setC7(rs.getBigDecimal(7));
				l.setC8(rs.getBigDecimal(8));
				l.setC9(rs.getBigDecimal(9));
				l.setC10(rs.getBigDecimal(10));
				l.setC11(rs.getBigDecimal(11));
				l.setC12(rs.getBigDecimal(12));
				l.setC13(rs.getBigDecimal(13));
				l.setC14(rs.getBigDecimal(14));
				l.setC15(rs.getBigDecimal(15));
				l.setC16(rs.getBigDecimal(16));
				l.setC17(rs.getBigDecimal(17));
				l.setC18(rs.getBigDecimal(18));
				l.setC19(rs.getBigDecimal(19));
				l.setC20(rs.getBigDecimal(20));
				l.setC21(rs.getBigDecimal(21));
				list.add(l);
			}
		} catch (SQLException e) {
			s_log.log(Level.SEVERE, "product", e);
		} finally {
			DB.close(rs, pstmt);
			rs = null;
			pstmt = null;
		}
		return list;
	}
	
	private String getRNN(int C_BPartner_ID) {
		String result = "";
		MBPartner bPartner = new MBPartner(getCtx(), C_BPartner_ID, null);
		result = bPartner.getFI_TIN();
		return result;
	}

	private String getOrgName(int AD_Org_ID) {
		String result = "";
		MOrg org = new MOrg(getCtx(), AD_Org_ID, null);
		result = org.getName();
		return result;
	}

	private String getBIN(int C_BPartner_ID) {
		String result = "";
		MBPartner bPartner = new MBPartner(getCtx(), C_BPartner_ID, null);
		result = bPartner.getFI_BIN_IIN();
		return result;
	}

	protected int getOrgBPartner_ID(int AD_Org_ID) {
		int result = -1;
		MOrg org = new MOrg(getCtx(), AD_Org_ID, null);
		result = org.getLinkedC_BPartner_ID(null);
		return result;
	}
	
	private int getAD_Org_ID() {
		int result = -1;
		String sql = "SELECT AD_Org_ID FROM AD_PInstance WHERE AD_PInstance_ID=?";
		PreparedStatement pstmt = null;
		ResultSet rs = null;
		try
		{
			pstmt = DB.prepareStatement(sql, get_TrxName());
			pstmt.setInt(1, getAD_PInstance_ID());
			rs = pstmt.executeQuery();
			if (rs.next())
			{
				result = rs.getInt(1);
			}
		}
		catch (SQLException e)
		{
			log.log(Level.SEVERE, sql, e);
		}
		finally {
			DB.close(rs, pstmt);
			rs = null; pstmt = null;
		}
		return result;
	}

	//
	// protected String uploadToExcel()throws Exception{
	//
	// // Types of cells for
	// Label label;
	// Number number;
	// // There are checks for a specified pattern
	// String templateName = "FI_DeclarationOfVAT300.07_tmpl.xls";
	// //
	// MAttachmentEntry entry = Utils.getAttachment(pi, m_ctx, templateName);
	// if(entry == null)
	// throw new AdempiereException(Msg.translate(m_ctx,
	// "NotFoundTemplate")+" "+templateName);
	// //
	// // // We define a path to generate
	// // String fileExtension =
	// entry.getName().substring(entry.getName().lastIndexOf("."),entry.getName().length());
	// // StringBuffer fullPath = new StringBuffer(path);
	// // fullPath.append("Temporary Balance Sheets");
	// // fullPath.append(fileExtension);
	// // //
	// File templateCopy = new File(Utils.localFilePath +
	// "FI_DeclarationOfVAT300.07.xls");
	// File temporaryFile = entry.getFile(Utils.localFilePath + templateName);
	// Workbook tableBook = null;
	// WritableWorkbook copy = null;
	// WritableSheet sheet = null;
	// try {
	// tableBook = Workbook.getWorkbook(temporaryFile);
	// copy = Workbook.createWorkbook(templateCopy, tableBook);
	// sheet = copy.getSheet(0);
	// } catch (Exception e) {
	// ADialog.error(999, null, "Error tableBook. " + e.getMessage());
	// return "Error tableBook.";
	// }
	//
	//
	// //
	// // ExcelCell cellStart = Utils.getCellStart(tableBook,">>");
	// // Style for value column
	// WritableCellFormat valuestyle = new WritableCellFormat();
	// valuestyle.setBorder(Border.LEFT, BorderLineStyle.MEDIUM, Colour.BLACK);
	// valuestyle.setBorder(Border.RIGHT, BorderLineStyle.THIN, Colour.BLACK);
	// valuestyle.setBorder(Border.BOTTOM, BorderLineStyle.THIN, Colour.BLACK);
	// valuestyle.setBorder(Border.TOP, BorderLineStyle.THIN, Colour.BLACK);
	// valuestyle.setAlignment(Alignment.RIGHT);
	// valuestyle.setVerticalAlignment(VerticalAlignment.CENTRE);
	// valuestyle.setWrap(true);
	//
	// List<line> l = getInvoices();
	// int count = l.size();
	// int row = 7;
	//
	// String caption = "Реестр счетов-фактур \n"
	// +
	// " по реализованным товарам, работам, услугам в течение отчетного налогового периода \n"
	// + " c " + new
	// java.text.SimpleDateFormat("dd.MM.yyyy").format(startDate).toString() +
	// " по " + new
	// java.text.SimpleDateFormat("dd.MM.yyyy").format(endDate).toString();
	// WritableCellFormat captionStyle = new WritableCellFormat();
	// captionStyle.setAlignment(Alignment.CENTRE);
	// captionStyle.setVerticalAlignment(VerticalAlignment.CENTRE);
	//
	// label = new Label(0, 0, caption, captionStyle);
	// sheet.addCell(label);
	//
	// for(int j=0; j < count; j++){
	// line li = l.get(j);
	// // System.out.println(li.);
	// label = new Label(0, row-1, Integer.valueOf(j+1).toString(), valuestyle);
	// sheet.addCell(label);
	//
	// //label = new Label(1, row-1, li.c_bpartner_id, valuestyle);
	// label = new Label(1, row-1, "", valuestyle);
	// sheet.addCell(label);
	//
	// label = new Label(2, row-1, li.fi_tin, valuestyle);
	// sheet.addCell(label);
	//
	// label = new Label(3, row-1, li.fi_bin_iin, valuestyle);
	// sheet.addCell(label);
	//
	// label = new Label(4, row-1, li.documentno, valuestyle);
	// sheet.addCell(label);
	//
	// label = new Label(5, row-1, li.dateinvoiced, valuestyle);
	// sheet.addCell(label);
	//
	// label = new Label(6, row-1, "", valuestyle);
	// sheet.addCell(label);
	//
	// label = new Label(7, row-1, "", valuestyle);
	// sheet.addCell(label);
	//
	// label = new Label(8, row-1, li.taxbaseamt, valuestyle);
	// sheet.addCell(label);
	//
	// label = new Label(9, row-1, li.taxamt, valuestyle);
	// sheet.addCell(label);
	//
	// label = new Label(10, row-1, li.taxamt2, valuestyle);
	// sheet.addCell(label);
	//
	// label = new Label(9, 3, li.period, valuestyle);
	// sheet.addCell(label);
	//
	// row++;
	//
	// }
	//
	// copy.write();
	// copy.close();
	// tableBook.close();
	// temporaryFile.delete();
	// //
	// try{
	// String fileName = Utils.localFilePath +
	// "FI_DeclarationOfVAT300.07.xls";//fullPath.toString();
	// String command = "excel \""+fileName+"\"";
	// Runtime.getRuntime().exec("cmd /c start "+command);
	// }catch(Exception e){
	// e.printStackTrace();
	// }
	//
	// return Msg.translate(m_ctx, "Success");
	// }
	//
	class line {

		Integer c1;
		String c2;
		String c3;
		String c4;
		BigDecimal c5;
		BigDecimal c6;
		BigDecimal c7;
		BigDecimal c8;
		BigDecimal c9;
		BigDecimal c10;
		BigDecimal c11;
		BigDecimal c12;
		BigDecimal c13;
		BigDecimal c14;
		BigDecimal c15;
		BigDecimal c16;
		BigDecimal c17;
		BigDecimal c18;
		BigDecimal c19;
		BigDecimal c20;
		BigDecimal c21;

		public Integer getC1() {
			return c1;
		}

		public void setC1(Integer c1) {
			this.c1 = c1;
		}

		public String getC2() {
			return c2;
		}

		public void setC2(String c2) {
			this.c2 = c2;
		}

		public String getC3() {
			return c3;
		}

		public void setC3(String c3) {
			this.c3 = c3;
		}

		public String getC4() {
			return c4;
		}

		public void setC4(String c4) {
			this.c4 = c4;
		}

		public BigDecimal getC5() {
			return c5;
		}

		public void setC5(BigDecimal c5) {
			this.c5 = c5;
		}

		public BigDecimal getC6() {
			return c6;
		}

		public void setC6(BigDecimal c6) {
			this.c6 = c6;
		}

		public BigDecimal getC7() {
			return c7;
		}

		public void setC7(BigDecimal c7) {
			this.c7 = c7;
		}

		public BigDecimal getC8() {
			return c8;
		}

		public void setC8(BigDecimal c8) {
			this.c8 = c8;
		}

		public BigDecimal getC9() {
			return c9;
		}

		public void setC9(BigDecimal c9) {
			this.c9 = c9;
		}

		public BigDecimal getC10() {
			return c10;
		}

		public void setC10(BigDecimal c10) {
			this.c10 = c10;
		}

		public BigDecimal getC11() {
			return c11;
		}

		public void setC11(BigDecimal c11) {
			this.c11 = c11;
		}

		public BigDecimal getC12() {
			return c12;
		}

		public void setC12(BigDecimal c12) {
			this.c12 = c12;
		}

		public BigDecimal getC13() {
			return c13;
		}

		public void setC13(BigDecimal c13) {
			this.c13 = c13;
		}

		public BigDecimal getC14() {
			return c14;
		}

		public void setC14(BigDecimal c14) {
			this.c14 = c14;
		}

		public BigDecimal getC15() {
			return c15;
		}

		public void setC15(BigDecimal c15) {
			this.c15 = c15;
		}

		public BigDecimal getC16() {
			return c16;
		}

		public void setC16(BigDecimal c16) {
			this.c16 = c16;
		}

		public BigDecimal getC17() {
			return c17;
		}

		public void setC17(BigDecimal c17) {
			this.c17 = c17;
		}

		public BigDecimal getC18() {
			return c18;
		}

		public void setC18(BigDecimal c18) {
			this.c18 = c18;
		}

		public BigDecimal getC19() {
			return c19;
		}

		public void setC19(BigDecimal c19) {
			this.c19 = c19;
		}

		public BigDecimal getC20() {
			return c20;
		}

		public void setC20(BigDecimal c20) {
			this.c20 = c20;
		}

		public BigDecimal getC21() {
			return c21;
		}

		public void setC21(BigDecimal c21) {
			this.c21 = c21;
		}

	}

}